<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('商品名称');
            $table->string('desc')->comment('商品描述');
            $table->string('img_urls')->comment('商品多图片地址json');
            $table->bigInteger('min_price')->comment('最低商品价格 单位分');
            $table->bigInteger('max_price')->comment('最高商品价格 单位分');
            $table->longText('detail')->comment('商品详情富文本');
            $table->integer('category_id')->comment('分类id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goods');
    }
}
